﻿using System;
using System.Collections.Generic;

using CrudServices;
using CrudServices.WebApi.Client;

using Northwind.Model;

namespace Client
{
    internal static class Program
    {
        private static void Main()
        {
            var client = new CrudClient(new CrudClientWebApi("http://localhost:2986/NorthwindData"));
            var product = client.Find<Product>(7);
            Console.WriteLine(product.ProductName);

            IEnumerable<Product> products = client.Search<Product>();
            foreach (Product product1 in products)
                Console.WriteLine(product1.ProductName);
            Console.ReadLine();
        }
    }
}